package com.zhenhao.xsq.ui.activity.home.module;


import com.zhenhao.xsq.data.api.HttpAPIWrapper;
import com.zhenhao.xsq.ui.activity.base.ActivityScope;
import com.zhenhao.xsq.ui.activity.home.MineFragment;
import com.zhenhao.xsq.ui.activity.home.contract.MineContract;
import com.zhenhao.xsq.ui.activity.home.presenter.MinePresenter;

import dagger.Module;
import dagger.Provides;

/**
 * @author xlei
 * @Package com.cxwl.xlxgj.ui.activity.home
 * @Description: The moduele of MineFragment, provide field for MineFragment
 * @date 2019/01/15 10:41:56
 */
@Module
public class MineModule {
    private final MineContract.View mView;


    public MineModule(MineContract.View view) {
        this.mView = view;
    }

    @Provides
    @ActivityScope
    public MinePresenter provideMinePresenter(HttpAPIWrapper httpAPIWrapper, MineFragment
            mFragment) {
        return new MinePresenter(httpAPIWrapper, mView, mFragment);
    }

    @Provides
    @ActivityScope
    public MineFragment provideMineFragment() {
        return (MineFragment) mView;
    }
}